<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			var span = document.createElement('span');
			var oInput = document.createElement('input');
			var cl = document.createElement('br');
			
			var spanName = span.cloneNode(true);
			spanName.innerHTML = '姓名';
			
			var inputName = oInput.cloneNode(true);
			inputName.setAttribute('type','text');
			
			var spanPwd = span.cloneNode(true);
			spanPwd.innerHTML = '密码';
			
			var inputPwd = oInput.cloneNode(true);
			inputPwd.setAttribute('type','password');
			
			window.onload = function(){
				var oBtn = document.getElementById("btn");
				oBtn.onclick = function(){
					document.body.appendChild(spanName);
					document.body.appendChild(inputName);
					document.body.appendChild(cl.cloneNode());
			
					document.body.appendChild(spanPwd);
					document.body.appendChild(inputPwd);
					document.body.appendChild(cl.cloneNode());
				}
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
		</script>
	</head>
	<body>
		<input type="button" value="创建" id="btn"/>
	</body>
</html>
